IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'ChapterInsert')
	BEGIN
		DROP  Procedure  ChapterInsert
	END

GO

CREATE Procedure ChapterInsert
@ChapterID Int,
@SagaID Int,
@Title Varchar(500),
@Header Ntext,
@Footer Ntext,
@StartMonth Int,
@StartYear Int,
@EndMonth Int,
@EndYear Int,
@OwnerID Int,
@ViewOrder Int,
@CreatorID Int,
@AccessType Int,
@LastUpdated Datetime,
@IsPrivate bit
AS
Insert Into Chapter 
(
	ChapterID,
	SagaID,
	Title,
	Header,
	Footer,
	StartMonth,
	StartYear,
	EndMonth,
	EndYear,
	OwnerID,
	ViewOrder,
	CreatorID,
	AccessType,
	LastUpdated,
	IsPrivate
)
Values
(
	@ChapterID,
	@SagaID,
	@Title,
	@Header,
	@Footer,
	@StartMonth,
	@StartYear,
	@EndMonth,
	@EndYear,
	@OwnerID,
	@ViewOrder,
	@CreatorID,
	@AccessType ,
	@LastUpdated, 
	@IsPrivate
)

Return SCOPE_IDENTITY()
GO

